<%
layout("/layouts/platform.html"){
%>
<header class="header navbar bg-white shadow">
    <div class="btn-group tool-button">       
    	<span style="position:relative;top:12px">审核加入的人员</span>
    </div>
</header>
<div class="content-wrap">
    <div class="wrapper" style="min-height:500px;">
    <form id="checkForm" role="form" class="form-horizontal parsley-form" data-parsley-validate
		                  action="${base}/platform/losys/factory" method="post">
        <section class="panel panel-form">
                <div class="row mb10">
                    <div class="col-lg-12">
                        <div class="form-group">
                        	<input type="hidden" id = "id" name = "id" value ="${obj.id}">
                            <label for="name" class="col-sm-2 control-label">用户名</label>		
                            <div class="col-sm-8">
                                <input type="text" id="loginname" class="form-control" name="loginname" data-parsley-required="true"
                                   readonly="readonly"    value="${obj.loginname}" placeholder="用户名">
                            </div>
                        </div>
                       <div class="form-group">
                            <label for="mobile" class="col-sm-2 control-label">联系方式</label>

                            <div class="col-sm-8">
                                <input type="text" id="phone" class="form-control" name="phone"
                                   readonly="readonly"  value="${obj.phone}"  placeholder="手机号码">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="apply_time" class="col-sm-2 control-label">店铺/⼯⼚名称</label>

                            <div class="col-sm-8">
                                <input type="text" id="shopname" class="form-control" name="shopname" 
                                 readonly="readonly" value="${obj.shopname}" placeholder="申请时间">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3"></div>
                <div class="col-lg-6">
                    <div class="form-group text-center">
                        <label></label>
                        <div>
                            <button class="btn btn-primary navbar-btn pass" data-pjax>审核通过</button>
                            <button class="btn btn-primary navbar-btn nopass"  data-pjax>审核不通过</button>
                            <a class="btn btn-primary navbar-btn" href="${base}/platform/losys/factory" data-pjax>取消</a>
                        </div>
                    </div>
                </div>
        </section>
</form>
    </div>
</div>
<%
}%>
<a class="exit-offscreen"></a>
<script>
    $(function(){
        $(".pass").on('click',function(){
            doAudit(1);
        });
        $(".nopass").on('click',function(){
            doAudit(0);
        });
        function doAudit(status){
            $.post('${base}/platform/losys/factory/doAudit',{
                id:'${obj.id}',
                status:status
            },function(rep){
                if(rep.code == 0){
                    Toast.success("操作成功！");
                    window.location.href = "${base}/platform/losys/factory";
                }
            },'json');
        }
    });
</script>
